﻿<%template _header%>
<%namespace YouHP.Model%>
<!--header end-->
<!--主体-->
<style>
 .hint
 {
 	background-color:#FEFFCF;
border:1px solid #E2C822;
font-size:16px;
font-weight:bold;
padding:10px;
color:Red;
width:700px;
text-align:left;
margin:0 auto;
}   
    
.postcardinfo
{
  text-align:center;
}
.postcardinfo .colorgray
{
	 background-color:#E6E6E6;
}
.postcardinfo span
{
	color:Green;
}
.postcardinfo .swapTab a
{
	color:Green!important;
	padding:5px;
	
}
.postcardinfo .swapTab
{
	margin-bottom:10px;
}
.postcardinfo table
{
	margin:0 auto;
	width:700px;
}
.postcardinfo td
{
	border-bottom:1px solid #E1E4E6;
	padding:5px;
}

</style>
<script type="text/javascript">
var curtab = "tel";
		function swapTab(tab, type)
		{

			 var ctrl = _$("ui-" + curtab);
			 ctrl.style.display = 'none';
			 ctrl = _$("ui-" + tab);
			 ctrl.style.display = 'block';
			 curtab = tab;
		}

function uploadAvatar()
{
    _$("postcardinfo").action="/Pages/alpha/Ajax/UploadAvatar.aspx";
   _$("postcardinfo").encoding = "multipart/form-data";
   _$("postcardinfo").target="hidden_frame";
    _$("postcardinfo").submit();
    
} 

function insertImg(src)
{
   _$("avatar").src = src;
   _$("uploadsubmit").disabled = false;
   _$("uploadsubmit").value = "确定";
   
   _$("new_avatar").value = src;
   
    _$("postcardinfo").action="";
    _$("postcardinfo").enctype="" ;
    _$("postcardinfo").target="";
   
}
function postData()
{
   var obj=_$("address");
   if(obj.value==obj.defaultValue)
   {
     obj.value="";
   }
   var obj2=_$("congratulation");
   if(obj2.value==obj.defaultValue)
   {
     obj2.value="";
   }
   
    _$("postcardinfo").submit();
   
}

</script>

                        <%if IsPost%>
                        <%template _msgbox%>
                        <%else%>
                        <div class="postcardinfo">
                        <div class="hint">为方便优医网为您制作<span>病友通讯录</span>和准确的为您寄送<span>YOUHP明信片</span>，请花点时间填好下面的相关信息，优医网谢谢您的配合。</div>     

                 <form action="" method="post" id="postcardinfo" name="postcardinfo">
         
                            <table border="0px;" cellpadding="0px;" cellspacing="0px;">
                                <tr>
                                    <td width="150px">
                                        <label for="username">
                                            您在优医网的用户名:</label>
                                    </td>
                                    <td>
                                        <input name="username" type="text" id="username" value="{_User.UserName}" class="colorgray"size="15"
                                            readonly="true" />
                                    </td>
                                </tr>
                                    <tr>
                                    <td>
                                        <label for="truename">
                                           您的真实姓名:</label>
                                    </td>
                                    <td>
                                        <input name="truename" type="text" id="truername"  class="colorblue"
                                            onfocus="this.className='colorfocus';" onblur="this.className='colorblue';" size="15" />
                                    </td>
                                </tr>
                                    <tr>
                                    <td>
                                        <label for="diseasename">
                                            您所患疾病:</label>
                                    </td>
                                    <td>
                                    
                                    <%csharp%>if(PrData.DiseaseId>0){<%/csharp%>
                                        <input name="diseasename" type="text" id="diseasename" value="{diseasename}" class="colorgray"size="30"
                                            readonly="true" />
                                    <%csharp%>}else{<%/csharp%>        
                                            
                                      <select id="diseaseId" name="diseaseId" style="width:180px;">
                                        <option value="0">-请选择-</option>
                                        <option value="1">高血压病</option>
                                        <option value="2">高血脂</option>
                                        <option value="3">克罗恩病</option>
                                        <option value="4">溃疡性结肠炎</option>
                                        <option value="5">糖尿病</option>
                                        <option value="6">特发性血小板减少性紫癜</option>
                                        <option value="7">慢性粒细胞白血病</option>
                                        <option value="8">慢性乙型肝炎/携带者</option>
                                        <option value="9">多发性骨髓瘤</option>
                                        <option value="20">支气管哮喘</option>
                                        <option value="10">其他</option>
                                    </select>
                                    <%csharp%>}<%/csharp%> 
                                    </td>
                                </tr>
                                
                                <tr>
                                   <td>
                                        <label for="avatar" >
                                            您的个人头像:</label>
                                    </td>
                                <td>
                                
                                <img  style="float:left;"src="{_User.Avatar}" id="avatar" alt="头像"  width="60px" height="60px"/>
                                <input type="hidden" id="new_avatar" name="new_avatar" />
                                <div style="float:left; margin-left:10px;">
                                <span>您的头像将会出现在病友通讯录上，选个您喜欢的头像吧！</span> 
                                <div>

                            <input name="file" id="file" type="file" size="40" />
                            <input type="button" id="uploadsubmit" onclick="uploadAvatar();this.value='正在处理...';this.disabled = true;" value="确定" />

                                
                                </div>
                              
                                 </div>
                                </td>
                                </tr>
                                
                                
                                <tr>
                                    <td>
                                        <label for="email" >
                                            Email:</label>
                                    </td>
                                    <td >
                                        <input type="text" id="email" value="{_User.Email}" size="30" readonly="true" class="colorgray" />
                                    </td>
                                </tr>
                                <tr>
                                 
                                    <td>
                                        <label for="contact">
                                            选择你愿意交换给病友的联系方式(可都填):</label>
                                    </td>
                                    <td >
                                    <div class="swapTab"><a href="javascript:" id="lnk-qq" name="qq" onclick="swapTab('qq',1);">QQ&nbsp;|</a><a href="javascript:" id="lnk-msn" name="msn" onclick="swapTab('msn',2);">MSN&nbsp;|</a> <a href="javascript:"id="lnk-tel" name="tel" onclick="swapTab('tel',3);">电话号码</a> </div>
                                       
                                       
                                        <div  id="ui-msn" style="display: none;">MSN：<input type="text" name="msn" id="msn" value="{_User.MSN}" size="30" class="colorblue"
                                            onfocus="this.className='colorfocus';" onblur="this.className='colorblue';" /></div>
   
                                        <div  id="ui-qq" style="display: none;">QQ:<input type="text" name="qq" id="qq" value="{_User.QQ}" size="30" class="colorblue"
                                            onfocus="this.className='colorfocus';" onblur="this.className='colorblue';" /></div>
        
 
                                        <div  id="ui-tel" style="display: none;">电话号码：<input name="mobile" type="text" id="mobile" value="{_User.MobilePhone}" class="colorblue"
                                            onfocus="this.className='colorfocus';" onblur="this.className='colorblue';" size="30" /></div>
                                    </td>
                                </tr>


                                <tr>
                                    <td>
                                        <label for="location">
                                            您的接收地址:</label>
                                    </td>
                                    <td>
                                        <textarea name="address" cols="60" rows="5" type="text" id="address" onblur="OnExit(this);" onfocus="OnEnter(this);"style="color: rgb(170, 170, 170);" 
                                         value="{_User.Address}">请仔细写下您能收到明信片的地址，您的地址我们为您保密！</textarea>
                                    </td>
                                </tr>
                                <tr>
                                    <td>
                                        <label for="zip">
                                           接收地邮政编码:</label>
                                    </td>
                                    <td>
                                        <input name="zip" type="text" id="location" class="colorblue" onfocus="this.className='colorfocus';"
                                            onblur="this.className='colorblue';" value="{_User.ZipCode}" size="30" />&nbsp;
                                    </td>
                                </tr>
                                <tr>
                                <td>                                                                                
                
                                        <label for="congratulation">
                                           您在新年的祝福:</label>
                                    </td>
                                    <td>
                                        <textarea name="congratulation" cols="60" rows="5" id="congratulation"onblur="OnExit(this);" onfocus="OnEnter(this);"style="color: rgb(170, 170, 170);" >为自己，为他人写下你祝福的话语吧！字数不超过500，我们将选取合适的刊登在明信片上！    
                                       </textarea>
                                            
                                    </td>
                                </tr>
                                <tr>
                                    <td colspan="2" align="right">
                                      <span class="new_sbt" onclick="javascript:postData();" onmouseover="this.className='new_sbt_h'" id="submitButton" onmouseout="this.className='new_sbt'">提交</span>
                                    </td>
                                </tr>
                            </table>
                 </form>
                        </div>
                        <iframe name='hidden_frame' id="hidden_frame" style='display:none'></iframe>
                        <%/if%>
   
<!--主体-->
<%template _footer%>

